<?php
namespace Ccc\Links\Controller;

/*                                                                        *
 * This script belongs to the FLOW3 package "Ccc.Links".                  *
 *                                                                        *
 *                                                                        */

use TYPO3\FLOW3\Annotations as FLOW3;

/**
 * Standard controller for the Ccc.Links package 
 *
 * @FLOW3\Scope("singleton")
 */
class StandardController extends \TYPO3\FLOW3\Mvc\Controller\ActionController {

	/**
	* @FLOW3\Inject
	* @var \Ccc\Links\Domain\Repository\LinkRepository
	*/
	protected $linkRepository;
	

	/**
	 * Index action
	 *
	 * @return void
	 */
	public function indexAction() {
		$this->view->assign('links', $this->linkRepository->findAll());
	}
	
	/**
	 * Index action
	 *
	 * @return void
	 */
	public function newAction() {
		$this->view->assign('nbrs', $nbrs);
	}
	
	/**
	 * Index action
	 *
	 * @return void
	 */
	public function createAction(\Ccc\Links\Domain\Model\Link $newLink) {
		$this->linkRepository->add($newLink);
		$this->redirect('index','Standard');
	}

}

?>